﻿using System.Collections.Generic;
using Codaxy.Xlio.Generic;

namespace ZQNB.Common.Xlios
{
    public class XlioHelper
    {
        public void Write<T>(string filePath, IList<T> list) where T : new()
        {
            XlioExporter.Export(list, filePath);
        }
        public void MakeTemplate<T>(string filePath) where T : new()
        {
            Write(filePath, new List<T>());
        }
        public IList<T> Read<T>(string filePath) where T : new()
        {
            List<T> import = XlioImporter.Import<T>(filePath);
            return import;
        }
    }
}
